#pragma once

namespace Base { namespace Sig {

    class SigSite;
    class Signal;

    class SigSource
    {
    protected:
        SigSource();
        virtual ~SigSource();
        
    public:
        void hook(SigSite*);
        void unhook(SigSite*);
        bool hookedWith(SigSite*) const;
        bool hooked() const;
        
        void send(Signal*);
        
    private:
        int indexOf(SigSite*) const;
    
    private:
        typedef std::vector<SigSite*> SigSites;
        
        SigSites    m_sigSites;
    };

}}